package ae.pcfc.cldos.online.web.controller.admin.general.inbox.tasks;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import ae.pcfc.cldos.online.common.vo.StatusVO;
import ae.pcfc.cldos.online.web.ViewPath;
import ae.pcfc.cldos.online.web.controller.base.BasePageController;

/**
 * A Controller For Admin Related Tasks (Task , Notifications etc)
 * @author ammar
 *
 */
@Controller
@RequestMapping(value = ViewPath.__ADMIN_TASKS)
public class AdminTasksController extends BasePageController {
	
	@ModelAttribute("StatusList")
	public List<StatusVO> getStatusList(HttpServletRequest request){
		List<StatusVO> statusList = adminTaskDelegate.findApplicationStatusByType("ONLINE");
		List<StatusVO> response = new ArrayList<StatusVO>();
		response.add(new StatusVO());
		response.addAll(statusList);
		return response;
	}
	
	@ModelAttribute
	public void populateBreadCrumbs(ModelMap model){
		breadCrumbsFactoryService.populateTasksBreadCrumb(model);
	}
	
	
	@RequestMapping(value = "/show.htm", method = RequestMethod.GET)
	public void show() {

	}
	
}
